import request from '@/utils/request'

// 查询重车作业单申报管理列表
export function listSwMftHead(query) {
  return request({
    url: '/swdecl/swMftHead/list',
    method: 'get',
    params: query
  })
}

// 查询重车作业单申报管理详细
export function getSwMftHead(id) {
  return request({
    url: '/swdecl/swMftHead/getInfo/' + id,
    method: 'get'
  })
}

//编辑详情
export function getEditSwMftHead(id) {
  return request({
    url: '/swdecl/swMftHead/getEditInfo/' + id,
    method: 'get'
  })
}


// 新增重车作业单申报管理
export function addSwMftHead(data) {
  return request({
    url: '/swdecl/swMftHead/add',
    method: 'post',
    data: data
  })
}

// 修改重车作业单申报管理
export function updateSwMftHead(data) {
  return request({
    url: '/swdecl/swMftHead/edit',
    method: 'post',
    data: data
  })
}

// 删除重车作业单申报管理
export function delSwMftHead(id) {
  return request({
    url: '/swdecl/swMftHead/remove/' + id,
    method: 'get'
  })
}

export function genGbill(id) {
  return request({
    url: '/swdecl/swMftHead/genGbill/' + id,
    method: 'get'
  })
}


// 申报
export function declSwMftHead(id) {
  return request({
    url: '/swdecl/swMftHead/addDecl/' + id,
    method: 'get'
  })
}

//申报确报
export function declSwMftBdHead(id) {
  return request({
    url: '/swdecl/swMftHead/decl/' + id,
    method: 'get'
  })
}

export function modifyDeclSwMftHead(data) {
  return request({
    url: '/swdecl/swMftHead/modifyDecl',
    method: 'post',
    data: data
  })
}

// 重发
export function declRepeatSwMftHead(id) {
  return request({
    url: '/swdecl/swMftHead/declRepeat/' + id,
    method: 'get'
  })
}


//退单
export function chargebackSwMftHead(data) {
  return request({
    url: '/swdecl/swMftHead/revokeDecl/' + id,
    method: 'post',
    data: data
  })
}
